﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> 
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Import Namespace="Microsoft.SharePoint" %> 
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RibbonPage.aspx.cs" Inherits="SPSolutions.Samples.RibbonApp.Layouts.RibbonApp.RibbonPage" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">

<script type="text/javascript">

    function RefreshRibbon() {

        var fn = function() {
            if (FV4UI()) {
                RibbonApp.UI.RibbonAppPageComponent.refreshRibbonStatus();
            }
        };
        var defd;
        try {
            defd = typeof (RibbonApp.UI.RibbonAppPageComponent.refreshRibbonStatus);
        }
        catch (e) {
            defd = "undefined"
        }
        EnsureScript("RibbonApp.UI.js", defd, fn);
    }

    function IsJSEnabled() {

        return document.getElementById("<%=CheckBoxEnabled.ClientID %>").checked;
    }

</script>

</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">

<table border="0" cellspacing="0" cellpadding="0" class="ms-propertysheet" width="100%">
	
	<% // Is Enabled Section %>
	<wssuc:InputFormSection Title="JS Enable / Disable" Description="Use this section to enable or disable the JSEnableDisable button." runat="server">
		<Template_InputFormControls>
            <wssuc:InputFormControl LabelText="Enable / Disable:" runat="server">
				<Template_Control>
                    <SharePoint:InputFormCheckBox ID="CheckBoxEnabled" Text="Is JS Enabled" onclick="RefreshRibbon();" runat="server" />
				</Template_Control>
			</wssuc:InputFormControl>
		</Template_InputFormControls>
	</wssuc:InputFormSection>
    
    <tr>
        <td height="1" class="ms-sectionline" colspan="2">
            <img src=/_layouts/images/blank.gif" width="1" height="1" alt="" />
        </td>
     </tr>
</table>

</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Ribbon Page
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
Ribbon Page
</asp:Content>
